package com.jtlrm.ckd.mvp.view.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.jtlrm.ckd.R;
import com.jtlrm.ckd.base.acitvity.TitleBarActivity;
import com.jtlrm.ckd.config.LiangBiaoName;

import java.util.List;

import butterknife.BindViews;

public class HomeLiangBiaoPingGuActivity extends TitleBarActivity implements View.OnClickListener{

    @BindViews({R.id.liangbiao_1, R.id.liangbiao_2, R.id.liangbiao_3, R.id.liangbiao_4, R.id.liangbiao_5, R.id.liangbiao_6})
    List<RelativeLayout> items;
    String patientId;

    public static void goDetail(Context context, String patientId){
        Intent intent = new Intent(context, HomeLiangBiaoPingGuActivity.class);
        intent.putExtra("patientId", patientId);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        patientId = getIntent().getStringExtra("patientId");
        super.onCreate(savedInstanceState);
    }

    @Override
    protected String getTitleText() {
        return "新增量表评估";
    }

    @Override
    protected void setContentLayout() {
        setContentView(R.layout.activity_home_liang_biao_ping_gu);
    }

    @Override
    protected void initView() {
        for (RelativeLayout relativeLayout : items) {
            relativeLayout.setOnClickListener(this);
        }
    }

    @Override
    protected void obtainData() {

    }

    @Override
    protected void initEvent() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.liangbiao_1:
                LiangBiaoPingGuSubListActivity.goDetail(context,patientId, LiangBiaoName.SGA,"SGA主观全面评定");
                break;
            case R.id.liangbiao_2:
                LiangBiaoPingGuSubListActivity.goDetail(context,patientId, LiangBiaoName.MIS,"MIS营养不良炎症评定");
                break;
            case R.id.liangbiao_3:
                LiangBiaoPingGuSubListActivity.goDetail(context,patientId, LiangBiaoName.NRS,"营养风险筛选NRS2002评估");
                break;
            case R.id.liangbiao_4:
                LiangBiaoPingGuSubListActivity.goDetail(context,patientId, LiangBiaoName.MNA,"MNA简易评估");
                break;
            case R.id.liangbiao_5:
                LiangBiaoPingGuSubListActivity.goDetail(context,patientId, LiangBiaoName.SF36,"SF36生活质量评估");
                break;
            case R.id.liangbiao_6:
                LiangBiaoPingGuSubListActivity.goDetail(context,patientId, LiangBiaoName.GLSGA,"改良SGA主观全面评定");

                break;
        }
    }
}
